GetImageDescriptionCTable
Your application may use theGetImageDescriptionCTable
function to set the custom color table for an image.
pascal OSErr GetImageDescriptionCTable (ImageDescriptionHandle desc, CTabHandle *ctable);
desc
- Contains a handle to the appropriate image description structure.
ctable
- Contains a pointer to a field that is to receive a color table handle. The
GetImageDescriptionCTable
function returns the color table for the image described by the image description structure that is referred to by thedesc
parameter. The function correctly sizes the handle for the color table it returns.DESCRIPTION
The Image Compression Manager stores the custom color table for an image in the appropriate image description structure. Your application must use QuickDraw'sDisposeCTable
routine to free the color table. (For details onDisposeCTable
, see Inside Macintosh: Imaging.)SPECIAL CONSIDERATIONS
If you want to find out if there is a custom color table, you should check the size of
theCTSize
orCTSeed
fields in the returnedctable
parameter. IfCTSize
is 0 or if theCTSeed
field is less than 0, then the color table is not a custom color table for that image.RESULT CODES
noErr 0 No error paramErr -50 Invalid parameter specified memFullErr -108 Not enough memory available noCodecErr -8961 The Image Compression Manager could not find the specified compressor